

package jetbrains.buildServer.server.rest.util.fieldInclusion;

import org.jetbrains.annotations.Nullable;

public enum FieldRule {
  INCLUDE,
  INCLUDE_NON_DEFAULT,
  EXCLUDE;

  @Nullable
  public Boolean asBoolean() {
    switch (this) {
      case EXCLUDE: return false;
      case INCLUDE: return true;
      case INCLUDE_NON_DEFAULT: return null;
    }
    return null;
  }
}